home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 2 / AACD 2.iso / AACD / Programming / fpc / compiler / opts68k.pas < prev    next >
Pascal/Delphi Source File  |  1998-09-24  |  5KB  |  177 lines

  1. {
  2.     $Id: opts68k.pas,v 1.1.1.1 1998/03/25 11:18:16 root Exp $
  3.     Copyright (c) 1993-98 by Florian Klaempfl, Pierre Muller
  4.  
  5.     interprets the commandline options which are m68k specific
  6.  
  7.     This program is free software; you can redistribute it and/or modify
  8.     it under the terms of the GNU General Public License as published by
  9.     the Free Software Foundation; either version 2 of the License, or
  10.     (at your option) any later version.
  11.  
  12.     This program is distributed in the hope that it will be useful,
  13.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  14.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  15.     GNU General Public License for more details.
  16.  
  17.     You should have received a copy of the GNU General Public License
  18.     along with this program; if not, write to the Free Software
  19.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  20.     }
  21.  
  22. unit opts68k;
  23. interface
  24.  
  25. uses
  26.   options;
  27.  
  28. type
  29.   poption68k=^toption68k;
  30.   toption68k=object(toption)
  31.     procedure interpret_proc_specific_options(const opt:string);virtual;
  32.   end;
  33.  
  34. implementation
  35.  
  36. uses
  37.   globals;
  38.  
  39. procedure toption68k.interpret_proc_specific_options(const opt:string);
  40. var
  41.   j : longint;
  42. begin
  43.   case opt[2] of
  44.    'A' : begin
  45.            if copy(opt,3,length(opt)-2)='o' then
  46.             begin
  47.               output_format:=of_o;
  48.               assem_need_external_list := false;
  49.             end
  50.            else
  51.             if copy(opt,3,length(opt)-2)='m' then
  52.              begin
  53.                output_format:=of_mot;
  54.                assem_need_external_list := true;
  55.              end
  56.            else
  57.             if copy(opt,3,length(opt)-2)='i' then
  58.              begin
  59.                output_format:=of_mit;
  60.                assem_need_external_list := false;
  61.              end
  62.            else
  63.             if copy(opt,3,length(opt)-2)='gas' then
  64.              begin
  65.                output_format:=of_gas;
  66.                assem_need_external_list := false;
  67.              end
  68.            else
  69.             IllegalPara(opt);
  70.          end;
  71.    'O' : begin
  72.            for j:=3 to length(opt) do
  73.             case opt[j] of
  74.              '-' : initswitches:=initswitches-[cs_optimize,cs_maxoptimieren,cs_littlesize];
  75.              'a' : initswitches:=initswitches+[cs_optimize];
  76.              'g' : initswitches:=initswitches+[cs_littlesize];
  77.              'G' : initswitches:=initswitches-[cs_littlesize];
  78.              'x' : initswitches:=initswitches+[cs_optimize,
  79.                     cs_maxoptimieren];
  80.              '2' : opt_processors := MC68020;
  81.              else
  82.               IllegalPara(opt);
  83.              end;
  84.          end;
  85.   else IllegalPara(opt);
  86.   end;
  87. end;
  88.  
  89. end.
  90. {
  91.   $Log: opts68k.pas,v $
  92.   Revision 1.1.1.1  1998/03/25 11:18:16  root
  93.   * Restored version
  94.  
  95.   Revision 1.13  1998/03/13 22:45:58  florian
  96.     * small bug fixes applied
  97.  
  98.   Revision 1.12  1998/03/10 16:27:39  pierre
  99.     * better line info in stabs debug
  100.     * symtabletype and lexlevel separated into two fields of tsymtable
  101.     + ifdef MAKELIB for direct library output, not complete
  102.     + ifdef CHAINPROCSYMS for overloaded seach across units, not fully
  103.       working
  104.     + ifdef TESTFUNCRET for setting func result in underfunction, not
  105.       working
  106.  
  107.   Revision 1.11  1998/03/10 01:17:21  peter
  108.     * all files have the same header
  109.     * messages are fully implemented, EXTDEBUG uses Comment()
  110.     + AG... files for the Assembler generation
  111.  
  112.   Revision 1.10  1998/03/06 00:52:31  peter
  113.     * replaced all old messages from errore.msg, only ExtDebug and some
  114.       Comment() calls are left
  115.     * fixed options.pas
  116.  
  117.   Revision 1.9  1998/03/05 02:44:15  peter
  118.     * options cleanup and use of .msg file
  119.  
  120.   Revision 1.8  1998/03/04 17:33:48  michael
  121.   + Changed ifdef FPK to ifdef FPC
  122.  
  123.   Revision 1.7  1998/03/02 01:48:47  peter
  124.     * renamed target_DOS to target_GO32V1
  125.     + new verbose system, merged old errors and verbose units into one new
  126.       verbose.pas, so errors.pas is obsolete
  127.  
  128.   Revision 1.6  1998/02/22 23:03:20  peter
  129.     * renamed msource->mainsource and name->unitname
  130.     * optimized filename handling, filename is not seperate anymore with
  131.       path+name+ext, this saves stackspace and a lot of fsplit()'s
  132.     * recompiling of some units in libraries fixed
  133.     * shared libraries are working again
  134.     + $LINKLIB <lib> to support automatic linking to libraries
  135.     + libraries are saved/read from the ppufile, also allows more libraries
  136.       per ppufile
  137.  
  138.   Revision 1.5  1998/02/21 03:34:27  carl
  139.     + mit asm syntax support
  140.  
  141.   Revision 1.4  1998/02/13 10:35:12  daniel
  142.   * Made Motorola version compilable.
  143.   * Fixed optimizer
  144.  
  145.   Revision 1.3  1998/02/12 11:50:15  daniel
  146.   Yes! Finally! After three retries, my patch!
  147.  
  148.   Changes:
  149.  
  150.   Complete rewrite of psub.pas.
  151.   Added support for DLL's.
  152.   Compiler requires less memory.
  153.   Platform units for each platform.
  154.  
  155.   Revision 1.2  1998/01/09 19:22:03  carl
  156.   * externals are now generated as appropriate
  157.  
  158.   Revision 1.1.1.1  1997/11/27 08:32:57  michael
  159.   FPC Compiler CVS start
  160.  
  161.   Pre-CVS log:
  162.  
  163.   CEC   Carl-Eric Codere
  164.   FK    Florian Klaempfl
  165.   PM    Pierre Muller
  166.   +     feature added
  167.   -     removed
  168.   *     bug fixed or changed
  169.  
  170.   History:
  171.       4th cotober 1997:
  172.          + copied stuff from opts386.pas and started unit (CEC)
  173.       8th cotober 1997:
  174.          * new command line options management (FK)
  175. }
  176.  
  177.